home *** CD-ROM | disk | FTP | other *** search
- on InitDatabases
- global titleDatabase
- put "Initializing Databases"
- if not objectp(titleDatabase) then
- set sourceList to ["platforms filedata", "bootcamp filedata", "coverstory filedata", "crypt filedata", "online filedata", "credits filedata", "codebook filedata 1", "codebook filedata 2", "codebook filedata 3", "codebook filedata 4"]
- set titleDatabase to new(script "databaseClass", sourceList)
- end if
- put "title initialized"
- end
-
- on CheckTitleDB
- global titleDatabase
- if objectp(titleDatabase) then
- set sectTree to the sectiontree of titleDatabase
- repeat with sectIndex = 1 to count(sectTree)
- set sectName to getPropAt(sectTree, sectIndex)
- set categorytree to getAt(sectTree, sectIndex)
- repeat with catIndex = 1 to count(categorytree)
- set catName to getPropAt(categorytree, catIndex)
- set recordTree to getAt(categorytree, catIndex)
- repeat with record in recordTree
- put sectName & ":" & catName & ":" & the name of record
- end repeat
- end repeat
- end repeat
- else
- put "titleDatabase not initialized"
- end if
- end
-